package com.eugenezadyra.rsstotwitter.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import java.util.Date;
import java.util.List;

/**
 * @author eugene zadyra
 */
@Entity(name = "feed_message")
public class FeedMessage extends AbstractEntity{
	private String message;
	private String url;
	@Column(name = "fetched_date")
	private Date fetchedDate;
	@Column(name = "message_date")
	private Date massageDate;
	@ManyToOne
	private Feed feed;
	@OneToMany(mappedBy = "feedMessage")
	private List<TwitterMessageQueue>twitterMessageQueues;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Date getFetchedDate() {
		return fetchedDate;
	}

	public void setFetchedDate(Date fetchedDate) {
		this.fetchedDate = fetchedDate;
	}

	public Date getMassageDate() {
		return massageDate;
	}

	public void setMassageDate(Date massageDate) {
		this.massageDate = massageDate;
	}

	public Feed getFeed() {
		return feed;
	}

	public void setFeed(Feed feed) {
		this.feed = feed;
	}

	public List<TwitterMessageQueue> getTwitterMessageQueues() {
		return twitterMessageQueues;
	}

	public void setTwitterMessageQueues(List<TwitterMessageQueue> twitterMessageQueues) {
		this.twitterMessageQueues = twitterMessageQueues;
	}
}
